/* 基础变量定义 */
:root {
  --primary-color: #4361ee;
  --primary-light: #4895ef;
  --primary-dark: #3f37c9;
  --secondary-color: #f72585;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --gray-color: #6c757d;
  --light-gray: #e9ecef;
  --border-radius: 12px;
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background-color: var(--light-color);
  color: var(--dark-color);
  line-height: 1.6;
}

/* 注册容器 */
.register-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  /* background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(143, 45, 86, 0.1) 100%); */
}

/* 注册卡片 */
.register-card {
  width: 100%;
  max-width: 480px;
  background: white;
  border-radius: var(--border-radius);
  padding: 40px;
  box-shadow: var(--box-shadow);
  position: relative;
  overflow: hidden;
}

.register-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* 标题区域 */
.register-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 8px;
  position: relative;
}

.register-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--secondary-color);
  margin: 10px auto;
  border-radius: 3px;
}

.register-subtitle {
  text-align: center;
  color: var(--gray-color);
  font-size: 14px;
  margin-bottom: 30px;
}

/* 头像上传区域 */
.avatar-uploader {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
}

.uploader-label {
  margin-top: 10px;
  font-size: 14px;
  color: var(--gray-color);
  font-weight: 500;
}

/* 表单样式 */
.register-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  position: relative;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--light-gray);
  border-radius: var(--border-radius);
  transition: var(--transition);
  overflow: hidden;
}

.input-wrapper:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.input-icon {
  padding: 0 15px;
  color: var(--gray-color);
  font-size: 18px;
}

.form-group input {
  flex: 1;
  padding: 14px 15px 14px 0;
  border: none;
  outline: none;
  font-size: 15px;
  background: transparent;
}

.form-group input::placeholder {
  color: #adb5bd;
}

/* 错误状态 */
.form-group.has-error .input-wrapper {
  border-color: var(--secondary-color);
}

.error-message {
  color: var(--secondary-color);
  font-size: 12px;
  margin-top: 6px;
  padding-left: 10px;
}

/* 注册按钮 */
.register-button {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.register-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(67, 97, 238, 0.4);
}

.register-button:disabled {
  background: var(--light-gray);
  transform: none;
  box-shadow: none;
  cursor: not-allowed;
}

.loading-text {
  display: inline-block;
  position: relative;
  padding-left: 25px;
}

.loading-text::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

/* 登录链接 */
.login-link {
  text-align: center;
  margin-top: 20px;
  color: var(--gray-color);
  font-size: 14px;
}

.login-link span {
  color: var(--primary-color);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.login-link span:hover {
  text-decoration: underline;
}

/* 图片上传器自定义样式 */
.adm-image-uploader-cell {
  border-radius: 50% !important;
  overflow: hidden;
  border: 2px solid var(--light-gray);
}

.adm-image-uploader-cell-mask {
  border-radius: 50% !important;
}

.adm-image-uploader-cell-remove {
  background: rgba(0, 0, 0, 0.5) !important;
}

/* 响应式调整 */
@media (max-width: 480px) {
  .register-card {
    padding: 30px 20px;
  }
  
  .register-title {
    font-size: 24px;
  }
  
  .input-wrapper {
    padding: 10px 0;
  }
  
  .form-group input {
    padding: 12px 15px 12px 0;
  }
}